/**
* This source code shows how to operate a image file from the 
* filesystem.
*
* The author, David Qiu, designs this method and implements it in
* OpenCV. The author remains all rights of the methods, algorithms,
* and code. One can only access to the code for study purpose.
* Commercial use or releasement related to the methods, algorithms,
* or code is NOT allowed.
*
* Creative Commons: BY-NC-ND
*
* Author:  David Qiu (david@davidqiu.com)
* Website: http://www.davidqiu.com/
*/

#ifndef _IMAGEFILEOPERATION_HPP_
#define _IMAGEFILEOPERATION_HPP_

#include <opencv.hpp>

int ImageFileOperation(int argc, char** argv)
{
  // Load image from file
  IplImage* image = cvLoadImage("test.jpg");

  // Display the image
  cvShowImage("image", image);

  // Wait for exit
  cvWaitKey(0);

  // Release resources
  cvReleaseImage(&image);

  // Program exit
  return 0;
}

#endif //_IMAGEFILEOPERATION_HPP_
